package com.punch.common.enums.user.user;

/**
 * @author tanchangguo
 * @date 2020/7/21 16:55
 */
public enum AuditStatusEnum {
    TO_AUDIT(0, "待审核"),
    SUBMITTED(1, "审核中"),
    FAIL(2, "审核失败"),
    PASSED(3, "审核成功"),
    ORG_UN_AUDIT_COMMIT(4, "机构待审核提交");;

    private int code;
    private String name;

    AuditStatusEnum(int code, String name) {
        this.code = code;
        this.name = name;
    }

    public static String getName(int code) {
        for (AuditStatusEnum em : AuditStatusEnum.values()) {
            if (em.getCode() == code) {
                return em.getName();
            }
        }
        return null;


    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
